import request from "@/utils/request";

export function listCourseware(pageNum, pageSize, type, name) {
    return request({
        url: '/courseware/list',
        method: 'get',
        params: {
            pageNum: pageNum,
            pageSize: pageSize,
            type: type,
            name: name,
        },
    })
}

export function downloadCourseware(id) {
    return request({
        url: '/courseware/download/' + id,
        method: 'get',
        responseType: 'blob',
        headers: {
            Authorization:localStorage.getItem('Authorization')
        }
    })
}

